﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BI.CF.Model;
using BI.CF.BLL;
using BI.CF.PageList;
using System.Web.Providers.Entities;

namespace BI.CF.Company.Controllers
{
    public class InvestGuanLiController : Controller
    {
        //
        // GET: /InvestGuanLi/
        InvestGuanLiBLL bll = new InvestGuanLiBLL();
        public ActionResult Index()
        {
            return View();
        }
        public string TouBiaoIng_Show()
        {
            //获取当前登录人
            UserrsModel Umodel = Session["UModel"] as UserrsModel;
            int pageindex = int.Parse(Request["pageindex"].ToString());
            int pagesize = int.Parse(Request["pagesize"]);
            Pager<MemloanADNMinvest>m= bll.Invest_Show_ing(pagesize, pageindex, Umodel.UserId);//未定义userid
            string str = JsonHelper.JsonSerializer<Pager<MemloanADNMinvest>>(m);
            return str;
        }
        /// <summary>
        /// 成功投资
        /// </summary>
        /// <returns></returns>
        public ActionResult ChengGong_TouZi()
        {
            return View();
        }
        public string ChengGong_Get()
        {
            DateTime TouStarTime =Convert.ToDateTime( Request["toubiaostartime"].ToString());
            DateTime TouEndTime =Convert.ToDateTime( Request["toubiaoend"].ToString());
            int pageindex = int.Parse(Request["pageindex"]);
            int pagesize = int.Parse(Request["pagesize"]);
            //获取当前登录人
            UserrsModel Umodel = Session["UModel"] as UserrsModel;
            Pager<MemloanADNMinvest> m = bll.ChengGnong_Show(TouStarTime, TouEndTime, Umodel.UserId, pageindex, pagesize);//用户ID未定义
            string str = JsonHelper.JsonSerializer<Pager<MemloanADNMinvest>>(m);
            return str;
        }
    }
}
